// File generated from our OpenAPI spec by Stainless.

package com.metest.api.services.async.rest.actuator

import com.metest.api.core.ClientOptions
import com.metest.api.core.RequestOptions
import com.metest.api.core.http.HttpResponse
import com.metest.api.core.http.HttpResponseFor
import com.metest.api.models.rest.actuator.loggers.LoggerListParams
import com.metest.api.models.rest.actuator.loggers.LoggerListResponse
import com.metest.api.models.rest.actuator.loggers.LoggerRetrieveParams
import com.metest.api.models.rest.actuator.loggers.LoggerRetrieveResponse
import com.metest.api.models.rest.actuator.loggers.LoggerUpdateParams
import java.util.concurrent.CompletableFuture
import java.util.function.Consumer

interface LoggerServiceAsync {

    /**
     * Returns a view of this service that provides access to raw HTTP responses for each method.
     */
    fun withRawResponse(): WithRawResponse

    /**
     * Returns a view of this service with the given option modifications applied.
     *
     * The original service is not modified.
     */
    fun withOptions(modifier: Consumer<ClientOptions.Builder>): LoggerServiceAsync

    /** Actuator web endpoint 'loggers-name' */
    fun retrieve(name: String): CompletableFuture<LoggerRetrieveResponse> =
        retrieve(name, LoggerRetrieveParams.none())

    /** @see retrieve */
    fun retrieve(
        name: String,
        params: LoggerRetrieveParams = LoggerRetrieveParams.none(),
        requestOptions: RequestOptions = RequestOptions.none(),
    ): CompletableFuture<LoggerRetrieveResponse> =
        retrieve(params.toBuilder().name(name).build(), requestOptions)

    /** @see retrieve */
    fun retrieve(
        name: String,
        params: LoggerRetrieveParams = LoggerRetrieveParams.none(),
    ): CompletableFuture<LoggerRetrieveResponse> = retrieve(name, params, RequestOptions.none())

    /** @see retrieve */
    fun retrieve(
        params: LoggerRetrieveParams,
        requestOptions: RequestOptions = RequestOptions.none(),
    ): CompletableFuture<LoggerRetrieveResponse>

    /** @see retrieve */
    fun retrieve(params: LoggerRetrieveParams): CompletableFuture<LoggerRetrieveResponse> =
        retrieve(params, RequestOptions.none())

    /** @see retrieve */
    fun retrieve(
        name: String,
        requestOptions: RequestOptions,
    ): CompletableFuture<LoggerRetrieveResponse> =
        retrieve(name, LoggerRetrieveParams.none(), requestOptions)

    /** Actuator web endpoint 'loggers-name' */
    fun update(name: String): CompletableFuture<Void?> = update(name, LoggerUpdateParams.none())

    /** @see update */
    fun update(
        name: String,
        params: LoggerUpdateParams = LoggerUpdateParams.none(),
        requestOptions: RequestOptions = RequestOptions.none(),
    ): CompletableFuture<Void?> = update(params.toBuilder().name(name).build(), requestOptions)

    /** @see update */
    fun update(
        name: String,
        params: LoggerUpdateParams = LoggerUpdateParams.none(),
    ): CompletableFuture<Void?> = update(name, params, RequestOptions.none())

    /** @see update */
    fun update(
        params: LoggerUpdateParams,
        requestOptions: RequestOptions = RequestOptions.none(),
    ): CompletableFuture<Void?>

    /** @see update */
    fun update(params: LoggerUpdateParams): CompletableFuture<Void?> =
        update(params, RequestOptions.none())

    /** @see update */
    fun update(name: String, requestOptions: RequestOptions): CompletableFuture<Void?> =
        update(name, LoggerUpdateParams.none(), requestOptions)

    /** Actuator web endpoint 'loggers' */
    fun list(): CompletableFuture<LoggerListResponse> = list(LoggerListParams.none())

    /** @see list */
    fun list(
        params: LoggerListParams = LoggerListParams.none(),
        requestOptions: RequestOptions = RequestOptions.none(),
    ): CompletableFuture<LoggerListResponse>

    /** @see list */
    fun list(
        params: LoggerListParams = LoggerListParams.none()
    ): CompletableFuture<LoggerListResponse> = list(params, RequestOptions.none())

    /** @see list */
    fun list(requestOptions: RequestOptions): CompletableFuture<LoggerListResponse> =
        list(LoggerListParams.none(), requestOptions)

    /**
     * A view of [LoggerServiceAsync] that provides access to raw HTTP responses for each method.
     */
    interface WithRawResponse {

        /**
         * Returns a view of this service with the given option modifications applied.
         *
         * The original service is not modified.
         */
        fun withOptions(
            modifier: Consumer<ClientOptions.Builder>
        ): LoggerServiceAsync.WithRawResponse

        /**
         * Returns a raw HTTP response for `get /rest/actuator/loggers/{name}`, but is otherwise the
         * same as [LoggerServiceAsync.retrieve].
         */
        fun retrieve(name: String): CompletableFuture<HttpResponseFor<LoggerRetrieveResponse>> =
            retrieve(name, LoggerRetrieveParams.none())

        /** @see retrieve */
        fun retrieve(
            name: String,
            params: LoggerRetrieveParams = LoggerRetrieveParams.none(),
            requestOptions: RequestOptions = RequestOptions.none(),
        ): CompletableFuture<HttpResponseFor<LoggerRetrieveResponse>> =
            retrieve(params.toBuilder().name(name).build(), requestOptions)

        /** @see retrieve */
        fun retrieve(
            name: String,
            params: LoggerRetrieveParams = LoggerRetrieveParams.none(),
        ): CompletableFuture<HttpResponseFor<LoggerRetrieveResponse>> =
            retrieve(name, params, RequestOptions.none())

        /** @see retrieve */
        fun retrieve(
            params: LoggerRetrieveParams,
            requestOptions: RequestOptions = RequestOptions.none(),
        ): CompletableFuture<HttpResponseFor<LoggerRetrieveResponse>>

        /** @see retrieve */
        fun retrieve(
            params: LoggerRetrieveParams
        ): CompletableFuture<HttpResponseFor<LoggerRetrieveResponse>> =
            retrieve(params, RequestOptions.none())

        /** @see retrieve */
        fun retrieve(
            name: String,
            requestOptions: RequestOptions,
        ): CompletableFuture<HttpResponseFor<LoggerRetrieveResponse>> =
            retrieve(name, LoggerRetrieveParams.none(), requestOptions)

        /**
         * Returns a raw HTTP response for `post /rest/actuator/loggers/{name}`, but is otherwise
         * the same as [LoggerServiceAsync.update].
         */
        fun update(name: String): CompletableFuture<HttpResponse> =
            update(name, LoggerUpdateParams.none())

        /** @see update */
        fun update(
            name: String,
            params: LoggerUpdateParams = LoggerUpdateParams.none(),
            requestOptions: RequestOptions = RequestOptions.none(),
        ): CompletableFuture<HttpResponse> =
            update(params.toBuilder().name(name).build(), requestOptions)

        /** @see update */
        fun update(
            name: String,
            params: LoggerUpdateParams = LoggerUpdateParams.none(),
        ): CompletableFuture<HttpResponse> = update(name, params, RequestOptions.none())

        /** @see update */
        fun update(
            params: LoggerUpdateParams,
            requestOptions: RequestOptions = RequestOptions.none(),
        ): CompletableFuture<HttpResponse>

        /** @see update */
        fun update(params: LoggerUpdateParams): CompletableFuture<HttpResponse> =
            update(params, RequestOptions.none())

        /** @see update */
        fun update(name: String, requestOptions: RequestOptions): CompletableFuture<HttpResponse> =
            update(name, LoggerUpdateParams.none(), requestOptions)

        /**
         * Returns a raw HTTP response for `get /rest/actuator/loggers`, but is otherwise the same
         * as [LoggerServiceAsync.list].
         */
        fun list(): CompletableFuture<HttpResponseFor<LoggerListResponse>> =
            list(LoggerListParams.none())

        /** @see list */
        fun list(
            params: LoggerListParams = LoggerListParams.none(),
            requestOptions: RequestOptions = RequestOptions.none(),
        ): CompletableFuture<HttpResponseFor<LoggerListResponse>>

        /** @see list */
        fun list(
            params: LoggerListParams = LoggerListParams.none()
        ): CompletableFuture<HttpResponseFor<LoggerListResponse>> =
            list(params, RequestOptions.none())

        /** @see list */
        fun list(
            requestOptions: RequestOptions
        ): CompletableFuture<HttpResponseFor<LoggerListResponse>> =
            list(LoggerListParams.none(), requestOptions)
    }
}
